home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / GXEnvironment.a < prev    next >
Encoding:
Text File  |  1997-08-12  |  9.6 KB  |  342 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        GXEnvironment.a
  3. ;
  4. ;    Contains:    QuickDraw GX environment constants and interfaces
  5. ;
  6. ;    Version:    Technology:    Quickdraw GX 1.1
  7. ;                Release:    Universal Interfaces 3.0.1
  8. ;
  9. ;    Copyright:    © 1994-1997 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__GXENVIRONMENT__') = 'UNDEFINED' THEN
  19. __GXENVIRONMENT__ SET 1
  20.  
  21.     IF &TYPE('__CONDITIONALMACROS__') = 'UNDEFINED' THEN
  22.     include 'ConditionalMacros.a'
  23.     ENDIF
  24.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  25.     include 'MixedMode.a'
  26.     ENDIF
  27.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  28.     include 'Quickdraw.a'
  29.     ENDIF
  30.     IF &TYPE('__GXTYPES__') = 'UNDEFINED' THEN
  31.     include 'GXTypes.a'
  32.     ENDIF
  33.     IF &TYPE('__CMAPPLICATION__') = 'UNDEFINED' THEN
  34.     include 'CMApplication.a'
  35.     ENDIF
  36.  
  37.  
  38. defaultPollingHandlerFlags        EQU        $00
  39. okToSwitchDuringPollFlag        EQU        $00
  40. dontSwitchDuringPollFlag        EQU        $01
  41. ; typedef long                             gxPollingHandlerFlags
  42.  
  43. ;
  44. ; extern gxPollingHandlerUPP GXGetGraphicsPollingHandler(long *reference)
  45. ;
  46.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  47.         Macro
  48.         _GXGetGraphicsPollingHandler
  49.             move.w              #$0245,D0
  50.             dc.w                $A832
  51.         EndM
  52.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  53.         IMPORT_CFM_FUNCTION GXGetGraphicsPollingHandler
  54.     ENDIF
  55.  
  56. ;
  57. ; extern void GXSetGraphicsPollingHandler(gxPollingHandlerUPP handler, long reference)
  58. ;
  59.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  60.         Macro
  61.         _GXSetGraphicsPollingHandler
  62.             move.w              #$0246,D0
  63.             dc.w                $A832
  64.         EndM
  65.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  66.         IMPORT_CFM_FUNCTION GXSetGraphicsPollingHandler
  67.     ENDIF
  68.  
  69.  
  70. ;  QD to QD GX Translator typedefs 
  71.  
  72. gxDefaultOptionsTranslation        EQU        $0000
  73. gxOptimizedTranslation            EQU        $0001
  74. gxReplaceLineWidthTranslation    EQU        $0002
  75. gxSimpleScalingTranslation        EQU        $0004
  76. gxSimpleGeometryTranslation        EQU        $0008                ; implies simple scaling 
  77. gxSimpleLinesTranslation        EQU        $000C                ; implies simple geometry & scaling 
  78. gxLayoutTextTranslation            EQU        $0010                ; turn on gxLine layout (normally off) 
  79. gxRasterTargetTranslation        EQU        $0020
  80. gxPostScriptTargetTranslation    EQU        $0040
  81. gxVectorTargetTranslation        EQU        $0080
  82. gxPDDTargetTranslation            EQU        $0100
  83. gxDontConvertPatternsTranslation EQU    $1000
  84. gxDontSplitBitmapsTranslation    EQU        $2000
  85. ; typedef long                             gxTranslationOption
  86.  
  87.  
  88. gxContainsFormsBegin            EQU        $0001
  89. gxContainsFormsEnd                EQU        $0002
  90. gxContainsPostScript            EQU        $0004
  91. gxContainsEmptyPostScript        EQU        $0008
  92. ; typedef long                             gxTranslationStatistic
  93.  
  94.  
  95. gxQuickDrawPictTag                EQU        'pict'
  96. gxQuickDrawPict            RECORD 0
  97. ;  translator inputs 
  98. options                     ds.l    1                ; offset: $0 (0)
  99. srcRect                     ds        Rect            ; offset: $4 (4)
  100. styleStretch             ds        Point            ; offset: $C (12)
  101. ;  size of quickdraw picture data 
  102. dataLength                 ds.l    1                ; offset: $10 (16)
  103. ;  file alias 
  104. alias                     ds        gxBitmapDataSourceAlias ; offset: $14 (20)
  105. sizeof                     EQU *                    ; size:   $1E (30)
  106.                         ENDR
  107. ;  WindowRecord utilities 
  108. ;
  109. ; extern gxViewPort GXNewWindowViewPort(WindowPtr qdWindow)
  110. ;
  111.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  112.         Macro
  113.         _GXNewWindowViewPort
  114.             move.w              #$0236,D0
  115.             dc.w                $A832
  116.         EndM
  117.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  118.         IMPORT_CFM_FUNCTION GXNewWindowViewPort
  119.     ENDIF
  120.  
  121. ;
  122. ; extern gxViewPort GXGetWindowViewPort(WindowPtr qdWindow)
  123. ;
  124.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  125.         Macro
  126.         _GXGetWindowViewPort
  127.             move.w              #$0237,D0
  128.             dc.w                $A832
  129.         EndM
  130.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  131.         IMPORT_CFM_FUNCTION GXGetWindowViewPort
  132.     ENDIF
  133.  
  134. ;
  135. ; extern WindowPtr GXGetViewPortWindow(gxViewPort portOrder)
  136. ;
  137.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  138.         Macro
  139.         _GXGetViewPortWindow
  140.             move.w              #$0238,D0
  141.             dc.w                $A832
  142.         EndM
  143.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  144.         IMPORT_CFM_FUNCTION GXGetViewPortWindow
  145.     ENDIF
  146.  
  147. ;  GDevice utilities 
  148. ;
  149. ; extern GDHandle GXGetViewDeviceGDevice(gxViewDevice theDevice)
  150. ;
  151.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  152.         Macro
  153.         _GXGetViewDeviceGDevice
  154.             move.w              #$0239,D0
  155.             dc.w                $A832
  156.         EndM
  157.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  158.         IMPORT_CFM_FUNCTION GXGetViewDeviceGDevice
  159.     ENDIF
  160.  
  161. ;
  162. ; extern gxViewDevice GXGetGDeviceViewDevice(GDHandle qdGDevice)
  163. ;
  164.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  165.         Macro
  166.         _GXGetGDeviceViewDevice
  167.             move.w              #$023A,D0
  168.             dc.w                $A832
  169.         EndM
  170.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  171.         IMPORT_CFM_FUNCTION GXGetGDeviceViewDevice
  172.     ENDIF
  173.  
  174. ;  gxPoint utilities 
  175. ;
  176. ; extern void GXConvertQDPoint(const Point *shortPt, gxViewPort portOrder, gxPoint *fixedPt)
  177. ;
  178.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  179.         Macro
  180.         _GXConvertQDPoint
  181.             move.w              #$023B,D0
  182.             dc.w                $A832
  183.         EndM
  184.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  185.         IMPORT_CFM_FUNCTION GXConvertQDPoint
  186.     ENDIF
  187.  
  188. ;  printing utilities typedef 
  189. ; typedef gxShapeSpoolProcPtr             gxShapeSpoolFunction
  190.  
  191. ; typedef gxUserViewPortFilterProcPtr     gxUserViewPortFilter
  192.  
  193. ; typedef gxConvertQDFontProcPtr         gxConvertQDFontFunction
  194.  
  195. ;  mouse utilities 
  196. ;  return mouse location in fixed-gxPoint global space 
  197. ;
  198. ; extern void GXGetGlobalMouse(gxPoint *globalPt)
  199. ;
  200.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  201.         Macro
  202.         _GXGetGlobalMouse
  203.             move.w              #$023C,D0
  204.             dc.w                $A832
  205.         EndM
  206.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  207.         IMPORT_CFM_FUNCTION GXGetGlobalMouse
  208.     ENDIF
  209.  
  210. ;  return fixed-gxPoint local mouse (gxViewPort == 0 --> default) 
  211. ;
  212. ; extern void GXGetViewPortMouse(gxViewPort portOrder, gxPoint *localPt)
  213. ;
  214.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  215.         Macro
  216.         _GXGetViewPortMouse
  217.             move.w              #$023D,D0
  218.             dc.w                $A832
  219.         EndM
  220.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  221.         IMPORT_CFM_FUNCTION GXGetViewPortMouse
  222.     ENDIF
  223.  
  224. ;  printing utilities 
  225. ;
  226. ; extern gxUserViewPortFilterUPP GXGetViewPortFilter(gxViewPort portOrder, long *refCon)
  227. ;
  228.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  229.         Macro
  230.         _GXGetViewPortFilter
  231.             move.w              #$025E,D0
  232.             dc.w                $A832
  233.         EndM
  234.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  235.         IMPORT_CFM_FUNCTION GXGetViewPortFilter
  236.     ENDIF
  237.  
  238. ;
  239. ; extern void GXSetViewPortFilter(gxViewPort portOrder, gxUserViewPortFilterUPP filter, long refCon)
  240. ;
  241.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  242.         Macro
  243.         _GXSetViewPortFilter
  244.             move.w              #$023E,D0
  245.             dc.w                $A832
  246.         EndM
  247.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  248.         IMPORT_CFM_FUNCTION GXSetViewPortFilter
  249.     ENDIF
  250.  
  251. ;  QD to QD GX Translator functions 
  252. ;
  253. ; extern void GXInstallQDTranslator(GrafPtr port, gxTranslationOption options, const Rect *srcRect, const Rect *dstRect, Point styleStrech, gxShapeSpoolUPP userFunction, void *reference)
  254. ;
  255.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  256.         Macro
  257.         _GXInstallQDTranslator
  258.             move.w              #$023F,D0
  259.             dc.w                $A832
  260.         EndM
  261.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  262.         IMPORT_CFM_FUNCTION GXInstallQDTranslator
  263.     ENDIF
  264.  
  265. ;
  266. ; extern gxTranslationStatistic GXRemoveQDTranslator(GrafPtr port, gxTranslationStatistic *statistic)
  267. ;
  268.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  269.         Macro
  270.         _GXRemoveQDTranslator
  271.             move.w              #$0240,D0
  272.             dc.w                $A832
  273.         EndM
  274.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  275.         IMPORT_CFM_FUNCTION GXRemoveQDTranslator
  276.     ENDIF
  277.  
  278. ;
  279. ; extern gxShape GXConvertPICTToShape(PicHandle pict, gxTranslationOption options, const Rect *srcRect, const Rect *dstRect, Point styleStretch, gxShape destination, gxTranslationStatistic *stats)
  280. ;
  281.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  282.         Macro
  283.         _GXConvertPICTToShape
  284.             move.w              #$0241,D0
  285.             dc.w                $A832
  286.         EndM
  287.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  288.         IMPORT_CFM_FUNCTION GXConvertPICTToShape
  289.     ENDIF
  290.  
  291. ;  Find the best GX style given a QD font and face. Called by the QD->GX translator 
  292. ;
  293. ; extern long GXConvertQDFont(gxStyle theStyle, long txFont, long txFace)
  294. ;
  295.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  296.         Macro
  297.         _GXConvertQDFont
  298.             move.w              #$0242,D0
  299.             dc.w                $A832
  300.         EndM
  301.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  302.         IMPORT_CFM_FUNCTION GXConvertQDFont
  303.     ENDIF
  304.  
  305. ;
  306. ; extern gxConvertQDFontUPP GXGetConvertQDFont(void )
  307. ;
  308.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  309.         Macro
  310.         _GXGetConvertQDFont
  311.             move.w              #$0243,D0
  312.             dc.w                $A832
  313.         EndM
  314.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  315.         IMPORT_CFM_FUNCTION GXGetConvertQDFont
  316.     ENDIF
  317.  
  318. ;
  319. ; extern void GXSetConvertQDFont(gxConvertQDFontUPP userFunction)
  320. ;
  321.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  322.         Macro
  323.         _GXSetConvertQDFont
  324.             move.w              #$0244,D0
  325.             dc.w                $A832
  326.         EndM
  327.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  328.         IMPORT_CFM_FUNCTION GXSetConvertQDFont
  329.     ENDIF
  330.  
  331. ; typedef unsigned long                 gxProfilePoolAttributes
  332.  
  333. gxFlatProfileListItem    RECORD 0
  334. attributes                 ds.l    1                ; offset: $0 (0)        ;  information about this particular profile's source
  335. profileRef                 ds.l    1                ; offset: $4 (4)        ;  reference to profile, only valid before shape is disposed
  336. identifier                 ds        CMProfileIdentifier ; offset: $8 (8)    ;  information on how to find the profile upon unflattening
  337. sizeof                     EQU *                    ; size:   $9A (154)
  338.                         ENDR
  339.  
  340.     ENDIF ; __GXENVIRONMENT__ 
  341.  
  342.